<?

$C = $data;
$D = new CDateFormatter('ru');
$AUTHOR = $C->GetRelated('com_author');
$CHILDREN = $C->getRelated('com_children');

$level = intval($level);

?><div class="comment" style="margin-left: <?=$level*30?>px;">
    <a name="showComments<?=$TASK->id?>-comment<?=$C->id?>"></a>
    <small><?=$D->formatDateTime($C->time_create, 'long', 'short')?></small><br />
    <div class="author"><?=$AUTHOR->getLink()?></div>
    <div class="text"><?=$C->text?></div>
    <a href="#" class="addreply" onclick="location.hash='form-add-comment-task<?=$TASK->id?>';addReply(<?=$C->id?>, <?=$TASK->id?>, '<?=$AUTHOR->getName()?>');return false;">
        Ответить
    </a>
</div>

<?
foreach($CHILDREN as $CHIL){
    $this->renderPartial('application.modules.task.views.task._list_comment_row', array(
        'TASK' => $TASK,
        'data' => $CHIL,
        'level' => $level+1
    ));
}?>
